package mornd.test1;

import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * @author: mornd
 * @dateTime: 2023/5/4 - 14:00
 */

@Component
public class Component2 {

    // 事件监听，这里监听 component1 的事件
    @EventListener
    public void listen(UserRegisterEvent event) {
        System.out.println("component2收到事件event：" + event);
    }
}
